﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace Zj.CourseManage.Domain.Core
{
    /// <summary>
    /// 教师
    /// </summary>
    public class Teacher
    {
        public Teacher()
        {
            this.CourseAssignments = new HashSet<CourseAssignment>();
            this.Name = string.Empty;
        }
        [Key]
        public int Id { get; set; }

        [Required]
        [StringLength(30)]
        public string Name { get; set; }



        [DataType( DataType.Date)]
        public DateTime HireDate { get; set; }

        public virtual ICollection<CourseAssignment> CourseAssignments { get; set; }



        public int OfficeId { get; set; }



        [ForeignKey("OfficeId")]
        public virtual Office Office { get; set; }
    }
}
